<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
  
  <h:body>

    <ui:insert name="content" >
      <ui:include src="template.xhtml" />
    </ui:insert>

    <!-- container -->
    <div id="content">
      <div class="container">
        <div class="row">

          <!-- DataTable -->
          <div class="span12">
            <!-- <div class="widget-content"> -->
            <h:form id="formTipoIndeferimento">

              <!-- /.page-title -->
              <div id="page-title" class="clearfix">
                <p:panelGrid columns="4" styleClass="semBorda">
                  <h:commandButton class="btn btn-secondary btn-regular" 
                                   style="width: 80px"
                                   value="Incluir" 
                                   action="#{tipoIndeferimentoBean.incluirTipoIndeferimento}"/>       
                  <h:commandButton class="btn btn-secondary btn-regular" 
                                   style="width: 80px"
                                   value="Alterar" 
                                   action="#{tipoIndeferimentoBean.preparaAlterarTipoIndeferimento}"/>       
                  <h:commandButton class="btn btn-secondary btn-regular" 
                                   style="width: 80px"
                                   value="Excluir" 
                                   action="#{tipoIndeferimentoBean.excluirTipoIndeferimento}"/>
                </p:panelGrid>
              </div>

              <div id="page-title" class="clearfix">
                <h3>Lista de Tipos de Indeferimento</h3>
                <p></p>
                <p:dataTable var="lista" 
                             value="#{tipoIndeferimentoBean.listaTipoIndeferimento}"
                             rowKey="#{lista.idTipoIndeferimento}" 
                             selectionMode="single"
                             selection="#{tipoIndeferimentoBean.tipoIndeferimento}"
                             scrollable="true" 
                             scrollHeight="400"
                             id="tabelaTiposRegime">

                  <p:column headerText="Código" style="width: 10%; text-align: center">
                    #{lista.idTipoIndeferimento}
                  </p:column>

                  <p:column headerText="Código do cliente" style="width: 20%; text-align: center">
                    #{lista.cdTipoIndeferimento}
                  </p:column>

                  <p:column headerText="Descrição" style="width: 100%">
                    #{lista.dsTipoIndeferimento}
                  </p:column>
                </p:dataTable>
              </div>
            </h:form>
          </div>
        </div>
      </div>
    </div>
    <!-- DataTable -->
  </h:body>
</html>
